<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>flex实现瀑布流布局</title>

		<style>
			* {
				padding: 0;
				margin: 0;
			}

			.container {
				/* flex布局 */
				display: flex;
				/* 使其纵向排列并且换行 */
				flex-flow: column wrap;
				height: 200vh;
			}

			.item {
				margin: 10px;
                /* 可以使用calc计算出宽度 */
				width: calc(100% / 5 - 20px);
			}

			.item .IU {
				width: 100%;
				height: 100%;
			}
		</style>
	</head>

	<body>
		<div class="container">
			<div class="item">
				<img src="../assets/IU1.png" class="IU" />
			</div>
			<div class="item">
				<img src="../assets/IU2.png" class="IU" />
			</div>
			<div class="item">
				<img src="../assets/IU3.png" class="IU" />
			</div>
			<div class="item">
				<img src="../assets/IU1.png" class="IU" />
			</div>
			<div class="item">
				<img src="../assets/IU2.png" class="IU" />
			</div>
			<div class="item">
				<img src="../assets/IU3.png" class="IU" />
			</div>
			<div class="item">
				<img src="../assets/IU1.png" class="IU" />
			</div>
			<div class="item">
				<img src="../assets/IU2.png" class="IU" />
			</div>
			<div class="item">
				<img src="../assets/IU3.png" class="IU" />
			</div>
			<div class="item">
				<img src="../assets/IU1.png" class="IU" />
			</div>
			<div class="item">
				<img src="../assets/IU2.png" class="IU" />
			</div>
			<div class="item">
				<img src="../assets/IU3.png" class="IU" />
			</div>
			<div class="item">
				<img src="../assets/IU1.png" class="IU" />
			</div>
			<div class="item">
				<img src="../assets/IU2.png" class="IU" />
			</div>
			<div class="item">
				<img src="../assets/IU3.png" class="IU" />
			</div>
		</div>
	</body>
</html>
